package com.example.tmapdemo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class ResultMap extends Activity {

	private TextView TvResult;	
	private String strAp ;		
	private String strBp ;
	private int iTotalTime ;
	private double dTotalDistance;
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.resultmap);
	    
	    TvResult = (TextView)findViewById(R.id.TvResult);
	    intenter();
	    TvResult.setText("");
	    if(strBp.equals(""))
	    	TvResult.setText("도착지 정보가 없습니다.");
	    else
	    	TvResult.setText(strAp + " -> " + strBp + "  \n " +
	    			 iTotalTime + "분, " + dTotalDistance + " KM.");
	}	

	 public void intenter()
	 {
	  Intent it = getIntent();  
	  strAp = it.getStringExtra("Apoint");
	  strBp = it.getStringExtra("Bpoint");
	  iTotalTime = it.getIntExtra("iTotalTime", 0);
	  dTotalDistance = it.getDoubleExtra("dTotalDistance", 0);
	 }
}
